<template>
	<view>
		<view style="margin-bottom: 10rpx; height: auto; width: 710rpx; margin-left: 20rpx;">
			<view class="cu-form-group margin-top" style=" border-top-left-radius: 40rpx; border-top-right-radius: 40rpx;">
				<image src="../../../static/rear/pigstyAndHouse/number.png" style="height: 48rpx; width: 48rpx;" mode="aspectFit"></image>
				<text style="width:40%; margin-left: -40rpx; font-size: 32rpx; font-weight: bold; ">用药编号：{{data.medication_id}}</text>
				<text @click="redact()">修改</text>
			</view>
			<view class="cu-form-group">
				<view class="title">畜牧编号</view>
				<input maxlength="12" type="text" placeholder="请输入使用的饲料" v-model="editor_feed_name" name="input" ></input>
				<text style="font-size: 30rpx; color: #7F7F7F;">{{data.livestock_id}}</text>
			</view>
			<view class="cu-form-group">
				<view class="title">药品名字</view>
				<text style="font-size: 30rpx; color: #7F7F7F;">{{data.medication_name}}</text>
			</view>
			
			<view class="cu-form-group">
				<view class="title">使用方式</view>
				<text style="font-size: 30rpx; color: #7F7F7F;">{{data.medication_mode}}</text>
			</view>
			<view class="cu-form-group">
				<view class="title">使用数量</view>
				<text style="font-size: 30rpx; color: #7F7F7F;">{{data.medication_quantity}}</text>
			</view>
			
			<view class="cu-form-group">
				<view class="title">兽药用药时间</view>
				<text style="font-size: 30rpx; color: #7F7F7F;">{{data.medication_modification_time}}</text>
			</view>
			
			<view class="cu-form-group">
				<view class="title">使用人员</view>
				<text style="font-size: 30rpx; color: #7F7F7F;">{{data.medication_personnel}}</text>
			</view>
			<view class="cu-form-group" style="border-bottom-left-radius: 40rpx; border-bottom-right-radius: 40rpx;">
				<view class="title">联系方式</view>
				<text style="font-size: 30rpx; color: #7F7F7F;">{{data.medication_information}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				data:""
			}
		},
		created() {
			uni.$on('drugsItem',(e)=>{
				this.data = e
				console.log(this.data)
			})
		},
		onReady() {
			console.log(this.data)
		},
		methods: {
			tishi(){
				uni.showModal({
					title:"提示",
					content:"你确定要保存更改吗?",
					success: (res) => {
						if(res.confirm){
							this.redact()
						}
					}
				})
			},
			redact(){
				uni.request({
					url:""
				})
			}
		}
	}
</script>

<style lang="less">
@import '../../../common/animate.css';
	@import '../../../common/main.css';
	@import "../../../common/iconfont.css";
</style>
